﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using SIGERP_Entidades;
using SIGERP_Negocio;

using System.Data.SqlClient;

namespace SIGERP_Presentacion
{
    public partial class frmABM : Form
    {
        

        public frmABM()
        {
            InitializeComponent();
        }

        public virtual void CargarGrilla()
        {

        }

        public virtual void busqueda()
        {

        }

        public virtual void agregar()
        {

        }

        public virtual void eliminar()
        {

        }

        public virtual void editar(int row,int column)
        {
            
        }

        public virtual void clickEnCelda(DataGridViewCellEventArgs e)
        {

        }

        public virtual void enterEnTextBox()
        {

        }

        public virtual void ayuda()
        {

        }

        private void frm_Load(object sender, EventArgs e)
        {
            CargarGrilla();
        }

        private void mnuSalir_Click(object sender, EventArgs e)
        {
            Close();
        }

        private void btnBuscar_Click(object sender, EventArgs e)
        {
          
        }        

        private void btnAgregar_Click(object sender, EventArgs e)
        {
            agregar();
            busqueda(); 
        }

        private void mnuEliminar_Click(object sender, EventArgs e)
        {
            eliminar();
            busqueda(); 
        }

        private void btnEditar_Click(object sender, EventArgs e)
        {
            editar(Grilla.SelectedCells[0].RowIndex,0);
            busqueda(); 
        }

        private void txtBusqueda_TextChanged(object sender, EventArgs e)
        {
            busqueda(); 
        }

        private void txtBusqueda_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == (char)13)
            {
                enterEnTextBox();
            }
        }

        private void Grilla_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            clickEnCelda(e);
        }

        private void Grilla_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            editar(e.RowIndex,e.ColumnIndex); 
        }

        private void toolStripAyuda_Click(object sender, EventArgs e)
        {
            ayuda();
        }

        private void toolStripButton2_Click(object sender, EventArgs e)
        {
            Close();
        }

    }
}